import fetch from './fetch'
const Http = {
  //登录 
  loginIn(param={}) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalAuth/hms/login',
      method:'post',
      data:param
    })
  },

  loginOut(param={}) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalAuth/hms/logout',
      method:'post',
      data:param
    })
  },

  //注册账号  
  register(param={}) { 
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalAuth/hms/register',
      method:'post',
      data:param
    })
  },

  //获取短信验证码   
  getHmsAuthCode(param) {
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/common/getHmsAuthCode?phone=${param.phone}&type=${param.type}`,
      method:'post',
    })
  },

  //绑定手机号  
  bindTel(param) {
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalAuth/hms/bindTel`,
      method:'post',
      data:param
    })
  },

  //验证码登录    
  LoginByTel(param) {
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalAuth/hms/LoginByTel`,
      method:'post',
      data:param
    })
  },

  //获取七牛 Token
  QiniuToken(param={}) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/common/hms/getQiNiuUpToken',
      method:'get',
      params:param
    })
  },
  //获取医院认证   首页用的   
  getCertification() {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalInfo/hms/certification',
      method:'get',
    })
  },
  //提交认证  
  addCertification(param){
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalInfo/hms/certification',
      method:'post',
      data:param
    })
  },

  //首页的内容  /
  getHomeData(param={}) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalInfo/hms/index',
      method:'get',
      params:param
    })
  },
  // 首页  新消息   
  getnewMsg() {
    return fetch({  
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalInfo/hms/newMsg',
      method:'get',
    })
  },
  //首页 预约
  gettodayReserve() {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalReserve/hms/todayReserve',
      method:'get',
    })
  },

  //管理员列表  /manager/cms/list
  MonitorList(page,size){
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalDoctor/hms/list?pageIndex=${page}&pageSize=${size}`,
      method:'get',
    })
  },
  
   //省 市 区 联动
   getAreaList(id){
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalInfo/hms/getAreaList?parentId=${id}`,
      method:'get',
    })
  },
  
  //医院信息   
  getHospitaInfo(){
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalInfo/hms/detail`,
      method:'get',
    })
  },
  //编辑医院信息  
  editHospitaInfo(param){
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalInfo/hms/edit`,
      method:'put',
      data:param
    })
  },
    
  //活动列表     
  getActivitysList(param){
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalActivity/hms/activitys`,
      method:'get',
      params:param
    })
  },

  // 获取所有医院  
  getAllDoctors(){  
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalDoctor/hms/allDoctors`,
      method:'get',
    })
  },
  //添加活动
  addActivityInsert(param={}) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalActivity/hms/insert',
      method:'post',
      data:param
    })
  },
  //删除活动    
  deletActivity(id) {
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalActivity/hms/delete/${id}`,
      method:'delete',
    })
  },
  
  //b编辑活动  
  editActivity(param) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalActivity/hms/edit',
      method:'put',
      data:param
    })
  },
  //获取医生列表   
  getDoctorList() {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalDoctor/hms/list',
      method:'get',
    })
  },
  
  //添加医生信息 
  addDoctorInsert(param) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalDoctor/hms/insert',
      method:'post',
      data:param
    })
  },
  //修改医生信息
  editDoctorInsert(param) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalDoctor/hms/edit',
      method:'put',
      data:param
    })
  },
  //删除医生   
  deletDoctor(id) {
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalDoctor/hms/${id}`,
      method:'delete',
    })
  },
  
  //修改密码   
  editPsw(param) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalAuth/hms/updatePWD',
      method:'put',
      data:param
    })
  },
  //预约管理 列表
  getReserveList(param) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalReserve/hms/list',
      method:'get',
      params:param
    })
  },
  editReserve(param) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalReserve/hms/edit',
      method:'put',
      data:param
    })
  },
  //商品列表
  getCommoLIst(param){
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalProduct/hms/list`,
      method:'get',
      params:param
    })
  },
  //商品分类
  getCommoTags(param){
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalProduct/hms/tags`,
      method:'get',
      params:param
    })
  },
   //商品分类
   getCommoTypes(param){
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalProduct/hms/types`,
      method:'get',
      params:param
    })
  },
  //商品管理状态编辑   
  upComoStatu(param) {
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalProduct/hms/updateStatus`,
      method:'put',
      data:param
    })
  },
  //商品管理上下线
  checkUpStatu(param) {
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalProduct/hms/updateStatus`,
      method:'put',
      data:param
    })
  },
  //添加医院信息    
  addCommoInsert(param) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalProduct/hms/insert',
      method:'post',
      data:param
    })
  },
  //商品信息
  editCommo(param) {
    return fetch({
      url:'http://www.yajiapp.com:8080/super_yaji_test/hospitalProduct/hms/edit',
      method:'put',
      data:param
    })
  },
  //查单个商品信息
  getCommoInfo(id) {
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalProduct/hms/${id}`,
      method:'get',
    })
  },
  //订单管理 
  getBuyList(param){
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalProductOrder/hms/list`,
      method:'get',
      params:param
    })
  },

  //首页 验证码 
  checkCode(param) {
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalProductOrder/hms/checkCode?vCode=${param}`,
      method:'put',
      data:param
    })
  },
  //到店 editTel 
  goHome(param){
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalReserve/hms/edit`,
      method:'put',
      data:param
    })
  },
  //流水记录   
  getWaterList(param){
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalDayAccount/hms/list`,
      method:'get',
      params:param
    })
  },
  //动态评价   
  getEvaluations(param){
    return fetch({
      url:`http://www.yajiapp.com:8080/super_yaji_test/hospitalProduct/hms/getEvaluations`,
      method:'get',
      params:param
    })
  },
  
}
export default Http